<%@ page import="org.ht.pojo.Users" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	Users users=(Users) session.getAttribute("globaluser");
	Integer id=users.getUid();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>p2p网贷平台</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<!--  -->
<link href="css/style.css" rel="stylesheet" />
<link href="css/newstyle.css" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="css/colorbox.css">
<link rel="shortcut icon" href="/statics/home/images/favicon.ico" type="image/x-icon"/>
<!--  -->

<link href="<%=basePath%>css/common.css" rel="stylesheet" />
<link href="<%=basePath%>css/register.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<%=basePath%>script/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>script/common.js"></script>
<script src="<%=basePath%>script/login.js" type="text/javascript"></script>





</head>
<body>
	 <!-- 导航栏 --><jsp:include page="head.jsp"></jsp:include>	
	<!--注册-->
	

<style>
body{ background:#f3f3f3; }
.applycon{ background:#f3f3f3; }
.applyc{ width:1350px; background:#fff; margin:0px auto; /*padding:15px;*/ }
.applyc1{ padding:50px 38px 70px; }
.applyc2{ padding:52px 157px 35px; background:#f5fbfe; }
.applyc2 .applyc2l,.applyc2 .applyc2r{ width:442px; text-align:center; font-size:14px; line-height:32px; vertical-align:middle; }
.applyc2 .applyc2l{ border-right:1px solid #ccc; }
.applyc2 .applyc2l h3,.applyc2 .applyc2r h3{ height:50px; line-height:45px; font-size:24px; color:#fff; font-weight:bold; background:url(images/borrow_img1.png) no-repeat center top; }
.applyc3{ padding:30px 100px 0px; background:#fff; }
.applyc3 h3{ width:100%; text-align:center; height:50px; line-height:45px; font-size:24px; color:#fff; font-weight:bold; background:url(images/borrow_img1.png) no-repeat center top; }
/*.applyc3 ul{ margin:25px 0 55px; }*/
.applyc3 ul li{ float:left; }
.applyc3 ul .rad{ width:141px;font-weight:normal; font-size:26px; color:#999; line-height:80px; vertical-align:middle; text-align:center;padding-left:20px}
.applyc3 ul .arrow{ width:35px;background:url(images/rowyel.png) no-repeat center;padding-top:30px;height:50px}
.applyc3 a{ display:block; width:200px; margin:0 auto; height:45px; line-height:45px; vertical-align:middle; text-align:center; font-size:20px; color:#fff; background:#ffa269; border-radius:10px; font-weight:bold; }
.nzx_fgs_titlen{ background:#5fb4e5; }
#nzx_fgs table tr td{ height:32px; }
.nzx_fgs{ width:90%; margin:0 auto; }
#nzx_fgs_title th{ background:#f5fbfe; color:#999; }
#nzx_fgs .nzx_fgs_title td{ background:#f5fbfe; }
#nzx_fgs .nzx_fgs_titlen td{ color:#fff; }
.applyform h3{ width:350px; text-align:center; height:50px; line-height:45px; margin-bottom:15px; font-size:24px; color:#fff; font-weight:bold; background:url(images/orange.png) no-repeat center top; }
.appstyle{ margin-bottom:10px; margin-left:75px;}
.appstyle a{ display:block; width:90px; height:35px; border:1px solid #ff9852; line-height:35px; vertical-align:middle; text-align:center; font-size:18px; color:#ff9852; font-weight:bold; margin-right:10px; border-radius:50px; float:left; }
#appstyle .appon{ background:#ff9852; color:#fff; }
.apform .trline32{ height:32px; margin-bottom:10px; }
.apform table tr td{ height:44px; line-height:44px; vertical-align:middle; font-size:15px; }
.applyBtn,.applyBtnenterprize{ display:block; margin-bottom: 5px; height:40px; line-height:40px; vertical-align:middle; text-align:center; font-size:20px; color:#fff; background:#ff9852; font-weight:bold; border-radius:5px; }
.applyBtn:hover,.applyBtnenterprize:hover{ background:#ff6d10; color:#fff; }
.apform .w100{ width:100px; text-align:right; display:block; margin-right:10px; }
.appinput{ width:160px; padding:0 5px; height:30px; line-height:30px; vertical-align:middle; text-align:left; border:1px solid #ccc; }
.apform .w120{ width:85px; text-align:center; }
.appinputimg1{ width:140px; padding:0 25px 0 5px; background:url(images/yuan.png) no-repeat 150px center; }
.appinputimg2{ width:115px; padding:0 50px 0 5px; background:url(images/pinfm.png) no-repeat 125px center; }
.appinputimg3{ width:140px; padding:0 25px 0 5px; background:url(images/year.png) no-repeat 150px center; }
.myselect{ color:#999; }

#divselect{width:172px; position:relative; z-index:10000; }
#divselect cite{width:130px; height:32px; line-height:32px; margin:6px 0; display:block; color:#999; cursor:pointer; font-style:normal;  padding-left:10px; padding-right:30px; text-align:left; border:1px solid #ccc; }
#divselect ul{ width:150px; border-left:1px solid #ccc; border-right:1px solid #ccc; border-bottom:1px solid #ccc; border-top:1px solid #fff; background-color:#ffffff; position:absolute; z-index:20000; margin-top:-7px; margin-left:0px; display:none; padding:8px 10px; }
#divselect ul li{ height:32px; line-height:32px;}
#divselect ul li a{ display:block; height:32px; color:#999; text-decoration:none; }
#divselect ul li a:hover{ color:#38b6ff; } 
.w250{ width:25%; text-align:center; }.w500{ width:50%; text-align:center; }
</style>
  <div class="applyc">
     <div class="applyc1 clearfix" style="background-repeat:no-repeat;background-image: url(./picture/borrowadd01.png);background-size:100% 530px;">
	   <div class="applyform fl" style="float: right;background: #ffffff;height:auto;margin-top: -45px">
		 <h3 class="mt10">申请</h3>
		   <div class="mt30 clearfix appstyle" id="appstyle"><a href="javascript:;" class="appon">车贷</a><a href="javascript:;">房贷</a></div>
		   <input type="text" id="uid" style="display:none;" value="<%=id%>">
		   <div class="appcon">
		     <div class="apform" id="car">
			   <table cellpadding="0">
				 <tr class="trline32 disN appconpanyname">
				   <td class="w100">公司名称</td>
				   <td><input type="text" class="appname appinput" name="appname" id="appname" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">姓名</td>
				   <td><input type="text" class="appusername appinput" name="appusername" id="appusername" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">手机号码</td>
				   <td><input type="number" min=0 class="appuserphone appinput" name="appuserphone" id="appuserphone"/></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">借款金额</td>
				   <td><input type="number" min=0 class="appusermoney appinput appinputimg1" name="appusermoney" id="appusermoney" /></td>
				 </tr>
				  <tr class="trline32">
				 	<td class="w100">贷款利率</td>
				 	<td>
						<select id="apprateC" style="width:90px;" class="myselect appinput">
			 				<option value="未选择" selected="selected">请选择</option>
							<option value="10">10%</option>
							<option value="12">12%</option>
							<option value="15">15%</option>
							<option value="20">20%</option>
							<option value="25">25%</option>
							<option value="30">30%</option>
				 		</select>
				 	</td>
				 </tr>
				  <tr class="trline32">
				 	<td class="w100">还款方式</td>
				 	<td>
						<select id="wayC" style="width:90px;" class="myselect appinput">
			 				<option value="未选择" selected="selected">请选择</option>
							<option value="1">一次性还清</option>
							<option value="2">先息后本</option>
							<option value="3">等额本息</option>
				 		</select>
				 	</td>
				 </tr>
				   <tr class="trline32">
					   <td class="w100">还款期限</td>
					   <td>
						   <select id="timeC" style="width:90px;" class="myselect appinput">
							   <option value="未选择" selected="selected">请选择</option>
							   <option value="6">6个月</option>
							   <option value="12">12个月</option>
							   <option value="18">18个月</option>
							   <option value="24">24个月</option>
							   <option value="30">30个月</option>
							   <option value="36">36个月</option>
						   </select>
					   </td>
				   </tr>
				 <tr class="trline32">
				   <td class="w100">车辆品牌</td>
				   <td><input type="text" class="appusercar appinput" name="appusercar" id="beizhu1" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">所属车型</td>
				   <td><input type="text" class="appusercarstyle appinput" name="appusercarstyle" id="beizhu2" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">所在区域</td>
				   <td>
					  
					  <select name="selectp" id="province" style="width:90px;" class="myselect appinput">
						<option value="未选择" selected="selected">请选择省</option>
						<option value="重庆">重庆</option>
						<option value="浙江">浙江</option>
						<option value="云南">云南</option>
						<option value="新疆">新疆</option>
						<option value="西藏">西藏</option>
						<option value="天津">天津</option>
						<option value="四川">四川</option>
						<option value="上海">上海</option>
						<option value="陕西">陕西</option>
						<option value="山西">山西</option>
						<option value="山东">山东</option>
						<option value="青海">青海</option>
						<option value="宁夏">宁夏</option>
						<option value="内蒙古">内蒙古</option>
						<option value="辽宁">辽宁</option>
						<option value="江西">江西</option>
						<option value="江苏">江苏</option>
						<option value="吉林">吉林</option>
						<option value="湖南">湖南</option>
						<option value="湖北">湖北</option>
						<option value="黑龙江">黑龙江</option>
						<option value="河南">河南</option>
						<option value="河北">河北</option>
						<option value="海南">海南</option>
						<option value="贵州">贵州</option>
						<option value="广西">广西</option>
						<option value="广东">广东</option>
						<option value="甘肃">甘肃</option>
						<option value="福建">福建</option>
						<option value="安徽">安徽</option>
						<option value="北京">北京</option>
					  </select>
				 </tr>
				 <tr class="trline32">
				   <td></td>
				   <td><a href="javascript:;" class="applyBtn"   onclick="key(0);">确认提交</a></td>
				 </tr>
			   </table>
			 </div>
			 <div class="apform disN" id="house" style="display: none">
			   <table cellpadding="0">
				 <tr class="trline32">
				   <td class="w100">公司名称</td>
				   <td><input type="text" class="appname appinput" name="appname" id="appnames"/></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">姓名</td>
				   <td><input type="text" class="appusername appinput" name="appusername" id="apphusernames" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">手机号码</td>
				   <td><input type="number" min=0 class="appuserphone appinput" name="appuserphone" id="apphuserphones" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">借款金额</td>
				   <td><input type="number" min=0 class="appusermoney appinput appinputimg1" name="appusermoney" id="apphusermoneys" /></td>
				 </tr>
				 <tr class="trline32">
				 	<td class="w100">贷款利率</td>
				 	<td>
						<select id="apprateH" style="width:90px;" class="myselect appinput">
			 				<option value="未选择" selected="selected">请选择</option>
							<option value="10">10%</option>
							<option value="12">12%</option>
							<option value="15">15%</option>
							<option value="20">20%</option>
							<option value="25">25%</option>
							<option value="30">30%</option>
				 		</select>
				 	</td>
				 </tr>
				   <tr class="trline32">
					   <td class="w100">还款方式</td>
					   <td>
						   <select id="wayH" style="width:90px;" class="myselect appinput">
							   <option value="未选择" selected="selected">请选择</option>
							   <option value="1">一次性还清</option>
							   <option value="2">先息后本</option>
							   <option value="3">等额本息</option>
						   </select>
					   </td>
				   </tr>
				   <tr class="trline32">
					   <td class="w100">还款期限</td>
					   <td>
						   <select id="timeH" style="width:90px;" class="myselect appinput">
							   <option value="未选择" selected="selected">请选择</option>
							   <option value="6">6个月</option>
							   <option value="12">12个月</option>
							   <option value="18">18个月</option>
							   <option value="24">24个月</option>
							   <option value="30">30个月</option>
							   <option value="36">36个月</option>
						   </select>
					   </td>
				   </tr>
				 <tr class="trline32">
				   <td class="w100">房屋面积</td>
				   <td><input type="number" min=0 class="appusercar appinput appinputimg2" name="appuserhouse" id="beizhu1s" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">房龄</td>
				   <td><input type="number" min=0 class="appusercarstyle appinput appinputimg3" name="appuserhousestyle" id="beizhu2s" /></td>
				 </tr>
				 <tr class="trline32">
				   <td class="w100">所在区域</td>
				   <td>
					  <select name="selectp" id="provincenews" style="width:90px;" class="myselect appinput">
					  	 <option value="未选择" selected="selected">请选择省</option>
						<option value="重庆">重庆</option>
						<option value="浙江">浙江</option>
						<option value="云南">云南</option>
						<option value="新疆">新疆</option>
						<option value="西藏">西藏</option>
						<option value="天津">天津</option>
						<option value="四川">四川</option>
						<option value="上海">上海</option>
						<option value="陕西">陕西</option>
						<option value="山西">山西</option>
						<option value="山东">山东</option>
						<option value="青海">青海</option>
						<option value="宁夏">宁夏</option>
						<option value="内蒙古">内蒙古</option>
						<option value="辽宁">辽宁</option>
						<option value="江西">江西</option>
						<option value="江苏">江苏</option>
						<option value="吉林">吉林</option>
						<option value="湖南">湖南</option>
						<option value="湖北">湖北</option>
						<option value="黑龙江">黑龙江</option>
						<option value="河南">河南</option>
						<option value="河北">河北</option>
						<option value="海南">海南</option>
						<option value="贵州">贵州</option>
						<option value="广西">广西</option>
						<option value="广东">广东</option>
						<option value="甘肃">甘肃</option>
						<option value="福建">福建</option>
						<option value="安徽">安徽</option>
						<option value="北京">北京</option>
					  </select>
		           </td>
				 </tr>
				 <tr class="trline32">
				   <td></td>
				   <td><a href="javascript:;" class="applyBtnenterprize"  onclick="key(1);">确认提交</a></td>
				 </tr>				 
                 <input type="hidden" id="type" name="type" value="3"/>
			   </table>
			 </div>
		   </div>
	   </div>
	 </div>
	 <div class="borrow-advancd" style="min-height:100px;">
		 <div class="inner clearfix">
			 <div class="borrow-advance-item item01" style="background-image: url(./images/advance01.png);background-size:130px,130px;background-repeat:no-repeat;float:left;width:300px">
				 <dl style="padding-left: 120px;padding-top:15px;padding-bottom: 20px">
					 <dt style="font-size:28px;padding-bottom: 5px;color:#999">
                         <span style="color:#FB943C">低</span>
						 门槛
					 </dt>
                     <dd style="color:#999;font-size:18px;line-height: 1.3;">
						 有车有房
						 <br>
						 就能借款
					 </dd>
				 </dl>
			 </div>

			 <div class="borrow-advance-item item02" style="background-image: url(./images/advance02.png);background-size:130px,130px;background-repeat:no-repeat;float:left;width:337.5px;height: 120px">
				 <dl style="padding-left: 120px;padding-top:15px;padding-bottom: 20px">
					 <dt style="font-size:28px;padding-bottom: 5px;color:#999">
						 <span style="color:#FB943C">快</span>
						 放款
					 </dt>
					 <dd style="color:#999;font-size:18px;line-height: 1.3;">
						 1-3个工作日即可审核完成
					 </dd>
				 </dl>
			 </div>

			 <div class="borrow-advance-item item03" style="background-image: url(./images/advance03.png);background-size:130px,130px;background-repeat:no-repeat;float:left;width:337.5px">
				 <dl style="padding-left: 120px;padding-top:15px;padding-bottom: 20px">
					 <dt style="font-size:28px;padding-bottom: 5px;color:#999">
						 <span style="color:#FB943C">高</span>
						 额度
					 </dt>
					 <dd style="color:#999;font-size:18px;line-height: 1.3;">
						 估计高
						 <br>
						 1-12月期限灵活
					 </dd>
				 </dl>
			 </div>

			 <div class="borrow-advance-item item04" style="background-image: url(./images/advance04.png);background-size:130px,130px;background-repeat:no-repeat;float:left;width:337.5px">
				 <dl style="padding-left: 120px;padding-top:15px;padding-bottom: 20px">
					 <dt style="font-size:28px;padding-bottom: 5px;color:#999">
						 <span style="color:#FB943C">不</span>
						 押车
					 </dt>
					 <dd style="color:#999;font-size:18px;line-height: 1.3;">
						 资料齐全
						 <br>
						 钱到账，车照开
					 </dd>
				 </dl>
			 </div>
		 </div>
	 </div>
	 <div class="applyc3">
	   <div style="font-size:37px;color:#EE7942;border-top:1px dashed #999;padding-top:30px;">申请流程</div>
	   <ul class="clearfix" style="padding-bottom:50px;border-bottom:1px dashed #999">
	     <li class="rad">进件资料</li>
		 <li class="arrow"></li>
	     <li class="rad">面审沟通</li>
		 <li class="arrow"></li>
	     <li class="rad">风险分析</li>
		 <li class="arrow"></li>
	     <li class="rad">审批会签</li>
		 <li class="arrow"></li>
	     <li class="rad">合同签署</li>
		 <li class="arrow"></li>
	     <li class="rad">资金放款</li>
	   </ul>
	 </div>
	 <div class="applyc4" >
		 <div style="font-size:37px;color:#EE7942;padding-top:30px;padding-left:100px;">
			 <span>常见问题</span>
			 <a href="help.jsp" style="font-size:20px;color:#999;padding-right:130px;float: right">查看更多</a>
		 </div>
		 <div style="padding:30px 100px 70px;color:#999">
			 <ul style="position:relative;line-height:30px;padding-left:28px;font-size:20px">
				 <li>
					 <i style="margin-top:6px;position:absolute;display: block;width:22px;font-style: normal;line-height:22px;border-radius:50%;text-align:center;left:0px;height:22px;color:#999;background-color: #ebecee">1</i>
					 如何借款？
					 <br/>您可以在“我要借款”页面点击“申请”按钮，填写申请后，我们的客户经理会与您取得联系。</li>
				 <li>
					 <i style="margin-top:6px;position:absolute;display: block;width:22px;font-style: normal;line-height:22px;border-radius:50%;text-align:center;left:0px;height:22px;color:#999;background-color: #ebecee">2</i>
					 如何选择借款产品？
					 <br/>您可以在“我要借款”页面看到借款产品的描述，点击“申请”按钮可以选择合适的产品进行申请。</li>
				 <li>
					 <i style="margin-top:6px;position:absolute;display: block;width:22px;font-style: normal;line-height:22px;border-radius:50%;text-align:center;left:0px;height:22px;color:#999;background-color: #ebecee">3</i>
					 我的信息有什么安全保障？
					 <br/>在您授权的情况下，我们依法收集您在第三方的部分数据，用作计算和分析您的信用情况，以便给出合适的借款额度进行参考。我们的数据存储和传输方采用了先进的加密机制，确保合理合法使用您的信息。</li>
				 <li>
					 <i style="margin-top:6px;position:absolute;display: block;width:22px;font-style: normal;line-height:22px;border-radius:50%;text-align:center;left:0px;height:22px;color:#999;background-color: #ebecee">4</i>
					 申请借款的审核需要多长时间？
					 <br/>审核一般会在1个工作日内完成，遇到特殊情况需要2-3个工作日。</li>
				 <br/>
				 <li>借款资金均来自于出借人，请理性借款</li>
			 </ul>
		 </div>
	 </div>

  </div>
  

<script type="text/javascript">
function key(i) {
	
	var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
    var uid=$("#uid").val();
		if (i==0) {
			
			
			var appname=$("#appname").val();
			var appusername=$("#appusername").val();
			var appuserphone=$("#appuserphone").val();
			var appusermoney=$("#appusermoney").val();
			var beizhu1=$("#beizhu1").val();
			var beizhu2=$("#beizhu2").val();

			//if (appname.length == 0 || appname.test(/^\s+$/g)){
			if (appname.length == 0 ){
			    window.alert('公司名称不能为空');
			    return false;
			}else if (appusername.length == 0 ){
			    window.alert('姓名不能为空');
			    return false;
			}
			var time= $("#timeC option:selected").val();
			var rate = $("#apprateC option:selected").val();  //获取选中的项
            var way = $("#wayC option:selected").val();  //获取选中的项
	
			var dq=$("#province option:selected").val();
			  $.post("brower/toaddborr.do", {
				     bserial:way,
				     btitle:appname,
				   	 brelname:appusername,
				   	 bpass:appuserphone,
				   	 bmoney:appusermoney,
				   	 brecommend:dq,
				   	 brate:rate,
				   	 bleixing:i,
					 beizhu1:beizhu1,
					 beizhu2:beizhu2,
				     userId:uid,
                  	 btimelimit:time
			  }, function(data) {
				 
			  }, "json");
			  alert("申请成功!保存手机通畅,请等待工作人员答复");
		}else if (i==1) {
			//alert(i);
			
			var appname=$("#appnames").val();
			var appusername=$("#apphusernames").val();
			var appuserphone=$("#apphuserphones").val();
			var appusermoney=$("#apphusermoneys").val();
			var beizhu1=$("#beizhu1s").val();
			var beizhu2=$("#beizhu2s").val();
			//if (appname.length == 0 || appname.test(/^\s+$/g)){
			if (appname.length == 0 ){
			    window.alert('公司名称不能为空');
			    return false;
			}else if (appusername.length == 0 ){
			    window.alert('姓名不能为空');
			    return false;
			}
            var time= $("#timeH option:selected").val();
			var dq=$("#provincenews option:selected").val();
			var rate = $("#apprateH option:selected").val();  //获取选中的项
            var way = $("#wayH option:selected").val();  //获取选中的项
			  $.post("brower/toaddborr.do", {
				     bserial:way,
				  	 btitle:appname,
				   	 brelname:appusername,
				   	 bpass:appuserphone,
				   	 bmoney:appusermoney,
				   	 brecommend:dq,
				   	 brate:rate,
				   	 bleixing:i,
					 beizhu1:beizhu1,
					 beizhu2:beizhu2,
				     userId:uid,
				     btimelimit:time
			  }, function(data) {}, "json");
			  alert("申请成功!保存手机通畅,请等待工作人员答复");
		}
}
</script>
<script type="text/javascript">

$(function(){
  $('#appstyle a').click(function(){
    var oIndex=$(this).index();
	$(this).addClass("appon").siblings().removeClass("appon");
	$('.apform').eq(oIndex).show().siblings().hide();
  })
  
  $('.applystyle').change(function(){
    var appNum=parseInt($(".applystyle").val());
	if(appNum==1){
	  $('.appconpanyname').show();
	}else{
	  $('.appconpanyname').hide();
	};
  })
  
  
})
</script>
 
 
	 
	 <!-- 导航栏 --><jsp:include page="bottom.jsp"></jsp:include>	
</body>
</html>
